import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'system/auth/login',
    method: 'post',
    data:data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}

export function userList(data) {
  return request({
    url: 'system/user/userList',
    method: 'post',
    data:data
  })
}
export function findCusSecurityCheckList(data) {
  return request({
    url: 'api/cusSecurityCheck/findCusSecurityCheckList',
    method: 'post',
    data:data
  })
}
export function insertCusSecurityCheck(data) {
  return request({
    url: 'api/cusSecurityCheck/insertCusSecurityCheck',
    method: 'post',
    data:data
  })
}

export function findCusSecurityCheckTaskList(data) {
  return request({
    url: 'api/cusSecurityCheckTask/findCusSecurityCheckTaskList',
    method: 'post',
    data:data
  })
}
export function findCusCustomerCate(data) {
  return request({
    url: 'api/customer/findCusCustomerCate',
    method: 'post',
    data:data
  })
}
export function findCusSecurityCheckTask(data) {
  return request({
    url: 'api/cusSecurityCheckTask/findCusSecurityCheckTask',
    method: 'post',
    params:data
  })
}
export function findLatentDangerList(data) {
  return request({
    url: 'api/cusLatentDanger/findLatentDangerList',
    method: 'post',
    data:data
  })
}
export function findCusSecurityCheckAnalysis(data) {
  return request({
    url: 'api/cusSecurityCheckAnalysis/findCusSecurityCheckAnalysis',
    method: 'post',
    data:data
  })
}
export function findCusStaffTask(data) {
  return request({
    url: 'api/cusSecurityCheckAnalysis/findCusStaffTask',
    method: 'post',
    data:data
  })
}
export function findCusDoorNoGas(data) {
  return request({
    url: 'api/doorNo/findCusDoorNoGas',
    method: 'post',
    data:data
  })
}

export function findLatentDangerCateList(data) {
  return request({
    url: 'api/cusLatentDangerCate/findLatentDangerCateList',
    method: 'post',
    data:data
  })
}

export function insertLatentDangerCate(data) {
  return request({
    url:data.id?'api/cusLatentDangerCate/updateLatentDangerCate':'api/cusLatentDangerCate/insertLatentDangerCate',
    method: 'post',
    data:data
  })
}

export function deleteLatentDangerCate(data) {
  return request({
    url: 'api/cusLatentDangerCate/deleteLatentDangerCate',
    method: 'post',
    data:data,
    params:data
  })
}

export function findAreaList(data) {
  return request({
    url: 'api/cusArea/findAreaList',
    method: 'post',
    data:data
  })
}

export function deleteCusSecurityCheck(data) {
  return request({
    url: 'api/cusSecurityCheck/deleteCusSecurityCheck',
    method: 'post',
    params:data
  })
}
